package org.example;

import java.util.HashMap;
import java.util.HashSet;
import java.util.Set;

class Solution {
    public boolean uniqueOccurrences(int[] arr) {
        HashMap<Integer, Integer> count = new HashMap<>();
        for (int val : arr) {
            count.put(val, count.getOrDefault(val, 0) + 1);
        }
        Set<Integer> set = new HashSet<>(count.values());
        return set.size() == count.size();
    }
}

public class Main {
    public static void main(String[] args) {
        System.out.println("Hello world!");
    }
}